import React, {Component} from 'react';
import './MusicList.css';
import {Link} from "react-router-dom";

class MusicList extends Component {
	render() {
		return (
			<ul className='musicList'>
				{
					this.props.music.map((item, index) => {
						return (
							<Link to={'/recommend/' + item.id} className='music' key={item.id}>
								<div className="img-container">
									<img src={item.picUrl} alt=""/>
								</div>
								<div className="count">
									<i className='iconfont icon-18erji-1'>{Math.floor(item.playCount / 10000)} 万</i>
								</div>
								<div className="desc">{item.name}</div>
							</Link>
						)
					})
				}


			</ul>
		);
	}
}

export default MusicList;